<template>
  <div
    class="app-container"
    :style="tableHeight"
  >
    <div class="app-title">
      <span>人员类别职务配置</span>
    </div>
    <el-row :gutter="20">
      <el-col :span="6">
        <div class="tap-fillet">
          <el-radio-group
            v-model="activeName"
            style="width:800px; height:15px; margin-top:-17px "
          >
            <el-radio-button
              label="0"
              name="personType"
            >人员类别
            </el-radio-button>
            <el-radio-button
              label="1"
              name="post"
            >职务
            </el-radio-button>
            <el-radio-button
              label="2"
              name="hookUp"
            >挂接
            </el-radio-button>
          </el-radio-group>
        </div>
      </el-col>
    </el-row>

    <personTypeChildre
      v-if="activeName=='0'"
      :key="timer"
      ref="person"
    />
    <postChildren
      v-if="activeName=='1'"
      :key="timer"
      ref="post"
    />
    <personTypePostHookUpChildren
      v-if="activeName=='2'"
      :key="timer"
      ref="hookup"
    />

  </div>
</template>

<script>
import personTypeChildre from '@/views/salaryConfigManage/children/personTypeChildren'
import postChildren from '@/views/salaryConfigManage/children/postChildren'
import personTypePostHookUpChildren from '@/views/salaryConfigManage/children/personTypePostHookUpChildren'
export default {
  name: 'PostTypePostConfig',
  components: { personTypeChildre, postChildren, personTypePostHookUpChildren },
  data() {
    return {
      tableHeight: null,
      timer: '',
      agency: true,
      salary: true,
      activeName: '0'
    }
  },
  // 图片显示
  watch: {

  },
  created() {
  },
  mounted() {
    this.getTbHeight()
  },
  beforeMount() {
    window.addEventListener('resize', this.getTbHeight)
  },
  methods: {
    // 获取table高度的方法
    getTbHeight() {
      const height = window.innerHeight - 93
      this.tableHeight = 'height : ' + height + 'px'
    }
  }
}
</script>

<style lang="scss" scoped>
@import "~@/styles/border.scss"; /*引入公共样式*/
.app-title {
  margin-bottom: 15px;
  height: 20px;
  border-bottom: 1px solid #DCDFE6;
}
</style>
